package tech.aistar.service.foster.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tech.aistar.entity.foster.Foster;
import tech.aistar.mapper.foster.FosterMapper;
import tech.aistar.service.foster.IFosterService;

import java.util.List;

@Service
@Transactional
public class FosterServiceImpl implements IFosterService {

    @Autowired
    private FosterMapper fosterMapper;


    @Override
    public void insert(Foster foster) {
        fosterMapper.insert(foster);
    }

    @Override
    public Foster findById(Integer id) {
        return fosterMapper.findById(id);
    }

    @Override
    public void updateById(Foster foster) {
        fosterMapper.updateById(foster);
    }

    @Override
    public void deleteById(Integer id) {
        fosterMapper.deleteById(id);
    }

    @Override
    public List<Foster> findAll() {
        return fosterMapper.findAll();
    }
}
